# ！ /usr/bin/python3
# -*- coding:utf-8 -*-
# @Author:Peng Cao
# @File: 操作xls文件.py
# @Software: PyCharm
import xlrd
from xlutils.copy import copy

# 读取
data = xlrd.open_workbook("./case_data.xls")
# 获取表名称
name = data.sheet_names()
print(name)
table = data.sheet_by_index(0)
# 获取行数
rows = table.nrows
print(rows)
# 获取列数
cols = table.ncols
print(cols)
# 获取每行数据
for nrow in range(1, table.nrows):
    value = table.row_values(nrow)
    print(value)
# 获取单元格值
value = table.cell_value(1, 1)
print(value)
print(type(value))

